//*****************************************************************************
//
// drive_task.h - Header and prototypes for motor drive controller
//
//*****************************************************************************

#ifndef __DRIVE_TASK_H__
#define __DRIVE_TASK_H__
#include "drivers/sensors.h"


// Defines the motor, right or left.
#define MOTOR_DRIVE_LEFT    0
#define MOTOR_DRIVE_RIGHT   1

// Defines the motor, right or left.
#define MOTOR_CLEAR_TICK  		 0
#define MOTOR_CLEAR_DIST   		 1
#define MOTOR_CLEAR_TICK_DIST    2

// Defines the directions for commanding the motor drive.
#define MOTOR_DRIVE_TURN_LEFT 0
#define MOTOR_DRIVE_TURN_RIGHT 1
#define MOTOR_DRIVE_FORWARD 3
#define MOTOR_DRIVE_REVERSE 4


// Function prototypes for the drive task module.
extern void DriveTask(void *pvParam);
extern void DriveStop(void);
extern void DriveRun(unsigned long ulDirection, unsigned long ulSpeedLeft, unsigned long ulSpeedRight);
extern void DriveInit(void);
extern long DriveSpeedGet(unsigned long ulMotor);
extern long DriveTickGet(tWheel eWheel);
extern void DriveDisplayTickGet(char *pcDisplayDist, char *pcDisplayTick,
		unsigned long ulSizeDist, unsigned long ulSizeTick);
extern void DriveClearMotor(unsigned long ulClear);



#endif
